<?php
    $tag_res = xl_tags_find_by_tid($thread['tid']);
    if (!empty($tag_res)) {
?>
<div class="d-flex small xl_tags">
    <?php
    $tag_list = [];
    foreach($tag_res as $tag) {
        $tag_list[] = "<a href='" . url('tag-' . $tag['name']) . "'>" . $tag['name'] . "</a>";
    }
    echo implode(',&nbsp;', $tag_list);
    ?>
</div>
<?php } ?>
